﻿using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace FaceMqttClient
{
    public class Worker : BackgroundService
    {


        protected override Task ExecuteAsync(CancellationToken stoppingToken)
        {
          

               Mqttlxb.ConnectMqttServerAsync();
                while (!stoppingToken.IsCancellationRequested)
                {
                    Mqttlxb.offline();
                    Thread.Sleep(1000 * 30);
                }
           
            return Task.CompletedTask;
        }

    }
}
